Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add contrib/upgrade.sh #18286

Merged
merged 22 commits into from
Feb 6, 2022
Merged

Add contrib/upgrade.sh #18286

merged 22 commits into from
Feb 6, 2022

Conversation

noerw
Copy link
Member

@noerw noerw commented Jan 15, 2022

Adds an upgrade script that automates upgrading installations on Linux from binary releases, so people don't need to reinvent the wheel. Hopefully this leads to less questions about how to upgrade, and consequently less Gitea instances running unmaintained versions in the wild.

Feel free to suggest improvements.
originally posted in #17405 (comment)

edit: This is meant as a stopgap for common linux deployments, an updater supporting all the different ways gitea can be deployed probably has ~2 orders of magnitude more complexity, so I didn't even try to accomodate for that.
Even for differing linux environments I assumed the user screens/tests/adapts this script for their needs, but I'll implement your feedback to make it more portable later (though given the tradeoff between portability and readability/extensibility, I side more with the latter option).

@noerw noerw added type/docs This PR mainly updates/creates documentation topic/ui-interaction Change the process how users use Gitea instead of the visual appearance labels Jan 15, 2022
Copy link
Contributor

@Gusted Gusted left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can see how this is helpful for servers to fast upgrade their gitea instance. But the script needs some work to do, in order to avoid some issues.

contrib/upgrade.sh Outdated Show resolved Hide resolved
contrib/upgrade.sh Outdated Show resolved Hide resolved
contrib/upgrade.sh Outdated Show resolved Hide resolved
contrib/upgrade.sh Outdated Show resolved Hide resolved
contrib/upgrade.sh Outdated Show resolved Hide resolved
contrib/upgrade.sh Show resolved Hide resolved
contrib/upgrade.sh Outdated Show resolved Hide resolved
contrib/upgrade.sh Outdated Show resolved Hide resolved
contrib/upgrade.sh Outdated Show resolved Hide resolved
contrib/upgrade.sh Outdated Show resolved Hide resolved
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jan 15, 2022
contrib/upgrade.sh Outdated Show resolved Hide resolved
contrib/upgrade.sh Outdated Show resolved Hide resolved
contrib/upgrade.sh Outdated Show resolved Hide resolved
contrib/upgrade.sh Outdated Show resolved Hide resolved
@lunny
Copy link
Member

lunny commented Jan 16, 2022

I can accept this in contrib but an official updater is better. So that, we need to know the environment, which OS is running the Gitea running and if it's in docker, if it's an official one or a third-party package.

@noerw noerw closed this Jan 16, 2022
@noerw noerw reopened this Jan 16, 2022
@codecov-commenter
Copy link

codecov-commenter commented Jan 16, 2022

Codecov Report

❗ No coverage uploaded for pull request base (main@1ddfa59). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main   #18286   +/-   ##
=======================================
  Coverage        ?   46.03%           
=======================================
  Files           ?      838           
  Lines           ?    92725           
  Branches        ?        0           
=======================================
  Hits            ?    42689           
  Misses          ?    43251           
  Partials        ?     6785           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1ddfa59...17894c5. Read the comment docs.

contrib/upgrade.sh Outdated Show resolved Hide resolved
contrib/upgrade.sh Outdated Show resolved Hide resolved
contrib/upgrade.sh Outdated Show resolved Hide resolved
contrib/upgrade.sh Outdated Show resolved Hide resolved
contrib/upgrade.sh Outdated Show resolved Hide resolved
contrib/upgrade.sh Outdated Show resolved Hide resolved
contrib/upgrade.sh Outdated Show resolved Hide resolved
contrib/upgrade.sh Outdated Show resolved Hide resolved
contrib/upgrade.sh Outdated Show resolved Hide resolved
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Jan 17, 2022
contrib/upgrade.sh Outdated Show resolved Hide resolved
@noerw noerw removed the status/blocked This PR cannot be merged yet, i.e. because it depends on another unmerged PR label Jan 21, 2022
contrib/upgrade.sh Outdated Show resolved Hide resolved
contrib/upgrade.sh Outdated Show resolved Hide resolved
contrib/upgrade.sh Show resolved Hide resolved
@zeripath zeripath dismissed their stale review January 22, 2022 22:00

Silverwind has approved

contrib/upgrade.sh Outdated Show resolved Hide resolved
contrib/upgrade.sh Outdated Show resolved Hide resolved
contrib/upgrade.sh Outdated Show resolved Hide resolved
@6543 6543 added this to the 1.17.0 milestone Feb 2, 2022
@HorlogeSkynet
Copy link
Contributor

Hi @noerw, just a quick message to send you https://gist.github.com/HorlogeSkynet/d676b9204869842933169dbe35ed8650 (a personal script I maintain publicly for this purpose).
Bye 👋

@6543
Copy link
Member

6543 commented Feb 6, 2022

🤖 wake up

@6543 6543 merged commit 6ada059 into go-gitea:main Feb 6, 2022
@6543 6543 deleted the contribu-upgrade branch February 6, 2022 20:07
zjjhot added a commit to zjjhot/gitea that referenced this pull request Feb 8, 2022
* giteaofficial/main: (28 commits)
  Added auto-save whitespace behavior if it changed manually (go-gitea#15566)
  Support custom ACME provider (go-gitea#18340)
  Refactor i18n, use Locale to provide i18n/translation related functions (go-gitea#18648)
  Only request write when necessary (go-gitea#18657)
  [skip ci] Updated translations via Crowdin
  Add separate SSH_USER config option (go-gitea#17584)
  Be more lenient with label colors (go-gitea#17752)
  remove redundant call to UpdateRepoStats during migration (go-gitea#18591)
  more repo dump/restore tests, including pull requests (go-gitea#18621)
  No longer show the db-downgrade SQL in production (go-gitea#18653)
  Fix the missing i18n key for update checker (go-gitea#18646)
  Update gitea-vet (go-gitea#18640)
  Future proof for 1.18 (go-gitea#18644)
  Add `contrib/upgrade.sh` (go-gitea#18286)
  If rendering has failed due to a net.OpError stop rendering (go-gitea#18642)
  Delete old git.NewCommand() and use it as git.NewCommandContext() (go-gitea#18552)
  Update JS dependencies (go-gitea#18636)
  fix commits_list_small.tmpl (go-gitea#18641)
  Fix `make fmt` and `make fmt-check` (go-gitea#18633)
  Frontport of changelog for v1.16.1 (go-gitea#18615)
  ...
Chianina pushed a commit to Chianina/gitea that referenced this pull request Mar 28, 2022
Adds an upgrade script that automates upgrading installations on Linux from binary releases, so people don't need to reinvent the wheel. Hopefully this leads to less questions about how to upgrade, and consequently less Gitea instances running unmaintained versions in the wild.

Co-authored-by: delvh <[email protected]>
Co-authored-by: Gusted <[email protected]>
Co-authored-by: zeripath <[email protected]>
Co-authored-by: 6543 <[email protected]>
@go-gitea go-gitea locked and limited conversation to collaborators Apr 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. topic/ui-interaction Change the process how users use Gitea instead of the visual appearance type/docs This PR mainly updates/creates documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.